import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import locale from 'element-plus/dist/locale/zh-cn.mjs'
// 导入Markdown编辑器
import VMdEditor from '@kangc/v-md-editor'
import '@kangc/v-md-editor/lib/style/base-editor.css'
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js'
import '@kangc/v-md-editor/lib/theme/style/vuepress.css'
import Prism from 'prismjs'
// 若仍存在类型错误，可尝试运行 `npm i --save-dev @types/prismjs` 安装类型声明文件，
// 或添加一个包含 `declare module 'prismjs';` 的新声明(.d.ts)文件

// 全局配置Markdown编辑器
VMdEditor.use(vuepressTheme, { Prism })

const app = createApp(App)

app.use(router)
app.use(ElementPlus, { locale })
app.use(VMdEditor) // 全局注册

app.mount('#app')
